feat: Introduce releaseFull command for automated releases#13
Open
sumyfly wants to merge 1 commit intoreactnativecn:masterfrom
Open
feat: Introduce releaseFull command for automated releases#13sumyfly wants to merge 1 commit intoreactnativecn:masterfrom
releaseFull command for automated releases#13sumyfly wants to merge 1 commit intoreactnativecn:masterfrom
Conversation
This commit introduces a new `releaseFull` command to the CLI.
This command streamlines the release process by orchestrating the
creation of a differential hot update package (.ppk), publishing it,
and binding it to a specified native application version in a single,
non-interactive operation.
Key changes include:
- New `releaseFull` command:
- Defined in `cli.json` with options for diff inputs (`origin`, `next`, `output`),
publishing metadata (`platform`, `name`, `description`, `metaInfo`,
`packageVersion`), and update parameters (`rollout`, `dryRun`).
- Implemented in `src/release.ts`, coordinating calls to diff, publish,
and update services.
- Registered in `src/index.ts`.
- Refactoring of Core Logic:
- `src/bundle.ts`: Exported `diffFromPPK` for direct use. The `bundle`
command now accepts `packageVersion` and other publishing metadata,
and can publish non-interactively if `name` is provided, as per
the supplied patch.
- `src/versions.ts`:
- Extracted `executePublish` for non-interactive bundle publishing.
- Introduced `getPackagesForUpdate` for non-interactive package selection
based on native `packageVersion`.
- `commands.publish` and `commands.update` now leverage these
refactored functions and incorporate changes from the supplied
patch (e.g., direct use of `metaInfo`, handling of `packageVersion`,
and conditional skipping of prompts).
- Testing:
- Added preliminary Jest tests for the `releaseFull` command, focusing on
its orchestration logic, option passing, and error handling for
missing required options.
This new command addresses the issue requirement by providing a comprehensive,
all-in-one CLI entry point for creating, uploading, and binding hot update
bundles, significantly improving automation capabilities.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new
releaseFullcommand to the CLI. This command streamlines the release process by orchestrating the creation of a differential hot update package (.ppk), publishing it, and binding it to a specified native application version in a single, non-interactive operation.Key changes include:
New
releaseFullcommand:cli.jsonwith options for diff inputs (origin,next,output), publishing metadata (platform,name,description,metaInfo,packageVersion), and update parameters (rollout,dryRun).src/release.ts, coordinating calls to diff, publish, and update services.src/index.ts.Refactoring of Core Logic:
src/bundle.ts: ExporteddiffFromPPKfor direct use. Thebundlecommand now acceptspackageVersionand other publishing metadata, and can publish non-interactively ifnameis provided, as per the supplied patch.src/versions.ts:executePublishfor non-interactive bundle publishing.getPackagesForUpdatefor non-interactive package selection based on nativepackageVersion. -commands.publishandcommands.updatenow leverage these refactored functions and incorporate changes from the supplied patch (e.g., direct use ofmetaInfo, handling ofpackageVersion, and conditional skipping of prompts).Testing:
releaseFullcommand, focusing on its orchestration logic, option passing, and error handling for missing required options.This new command addresses the issue requirement by providing a comprehensive, all-in-one CLI entry point for creating, uploading, and binding hot update bundles, significantly improving automation capabilities.